<!--
 * @Description: 
 * @Author: charles
 * @Date: 2021-05-05 22:02:56
 * @LastEditors: charles
 * @LastEditTime: 2021-07-14 15:18:36
-->
<template>
  <!--1. 容器 -->
<div ref="bottom3_container" style="height: 95%"></div>
</template>
<script>
import { get } from '../../../utils/request';
import { Radar } from '@antv/g2plot';
export default{
  data(){
    return{
      dataArr:[]
    }
  },
  mounted(){
    this.initData()
  },
  methods:{
    initData(){
      get('dashboard/queryEngineerBindDeviceNumber').then(res=>{
        console.log(444,res);
        this.dataArr = res.data
        this.initChart()
      })
    },
    initChart(){
      const radar = new Radar(this.$refs.bottom3_container,{
         data:this.dataArr,
            xField: 'type',
            yField: 'value',
            meta: {
              value: {
                 min: 0,
                nice: true,
                    },
                  },
            area: {},
      })
      radar.render()
    }
  }
}

</script>